<?php
if(isset($_SESSION[sess_login])){
	$permission = $_SESSION[sess_login]['permission'];
 	if ($permission == '2' || $permission =='3'){
?>
<form name="add_user"  id="add_user" autocomplete="off" onsubmit="return false;">
<table border="0" cellspacing="0" cellpadding="5" class="table_td28">
  <tr>
    <td valign="top" width="320" >
 <fieldset>
 <legend> Login Info </legend> 
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="120" align="right" valign="middle">User ID: </td>
    <td width="200" align="left" valign="middle"><input type="text" name="uname" id="uname"></td>
  </tr>
  <tr>
    <td align="right" valign="middle">Password: </td>
    <td align="left" valign="middle"><input type="password" name="upass" id="upass"></td>
  </tr>
  <tr>
    <td align="right" valign="middle">Email: </td>
    <td align="left" valign="middle"><input type="text" name="uemail" id="uemail"></td>
  </tr>
  <tr>
    <td align="right" valign="middle">&nbsp;</td>
    <td align="left" valign="middle"><input type="checkbox" name="usentmail" id="usentmail" />
      <span class="note">Sent ID & pass for this email</span></td>
  </tr>
  <tr>
    <td align="right" valign="middle">Permission: </td>
    <td align="left" valign="middle"><select name="upermission" id="upermission">
      <option value="1" selected>Normal user   </option>
      <option value="2">Moderator   </option>
      <option value="3">Admin   </option>
    </select></td>
  </tr>
</table>
</fieldset>

</td>
    <td width="350" valign="top">
   <fieldset>
 <legend> User Info </legend> 
  
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="150" align="right" valign="middle">Full Name: </td>
    <td width="200" align="left" valign="middle"><input type="text" name="ufullname" id="ufullname"></td>
  </tr>
  <tr>
    <td align="right" valign="middle">Birthday: </td>
    <td align="left" valign="middle"><input type="text" name="ubirthday" id="ubirthday"></td>
  </tr>
  <tr>
    <td align="right" valign="middle">Address: </td>
    <td align="left" valign="middle"><input type="text" name="uaddress" id="uaddress"></td>
  </tr>
  <tr>
    <td align="right" valign="middle">Phone Number: </td>
    <td align="left" valign="middle"><input type="text" name="uphonenumber" id="uphonenumber"></td>
  </tr>
  <tr>
    <td align="right" valign="middle">&nbsp;</td>
    <td align="left" valign="middle">
      <input type="submit" name="submit" id="submit" value=" Create User ">
      <input type="reset" name="reset" id="reset" value="Reset">
    </td>
  </tr>
</table>
</fieldset>
    </td>
  </tr>
</table>

</form>
<span class="note">* Phần gửi email chưa xong</span>
<?php
 	} else {
		echo '<center><br /><br />You are not permission</center>';
	}
}
else {
	echo '<center><br /><br />Please Login</center>';
}

?>
<script>
$(document).ready(function(){
  $("#uname").focus();
});
</script>